<template>
  <div>
    <el-calendar v-model="value">
      <template
        #dateCell="{date, data}"
      >
        {{ new Date(data.day).getDate() }}
        <span class="rest">{{ isWeekend(date) ? '休':'' }}</span>
      </template>
    </el-calendar>
  </div>
</template>

<script>
export default {
  name: 'Calendar',

  data() {
    return {

    }
  },

  mounted() {

  },

  methods: {
    isWeekend(date) {
      const day = date.getDay()
      return day === 6 || day === 0
    }
  }
}
</script>

<style lang="scss" scoped>
    .rest{
        color: #fff;
        background-color: rgb(227, 138, 29);
        border-radius: 50%;

    }
</style>
